<div nz-row>
  <div nz-col nzSpan="8">
    <nz-card style="width: 90%;margin-top: 16px;">
      <nz-card-meta [nzAvatar]="avatarTemplate1" [nzTitle]="data.bjtj.allalert" nzDescription="当前卡控报警">
      </nz-card-meta>
    </nz-card>
    <ng-template #avatarTemplate1>
      <nz-avatar nzIcon="alert" [nzShape]="'square'" style="background: #2cce4b;" class="kkbj-titleinfo"></nz-avatar>
      <!-- <i nz-icon nzType="alert" nzTheme="outline" style="background: #2cce4b;"></i> -->
    </ng-template>
  </div>
  <div nz-col nzSpan="8">
    <nz-card style="width: 90%;margin-top: 16px">
      <nz-card-meta [nzAvatar]="avatarTemplate2" [nzTitle]="data.bjtj.ckalert" nzDescription="已审核">
      </nz-card-meta>
    </nz-card>
    <ng-template #avatarTemplate2>
      <!-- <i nz-icon nzType="audit" nzTheme="outline"></i> -->
      <nz-avatar nzIcon="audit" [nzShape]="'square'" style="background: #24cecd;" class="kkbj-titleinfo"></nz-avatar>
    </ng-template>
  </div>
  <div nz-col nzSpan="8">
    <nz-card style="width: 90%;margin-top: 16px">
      <nz-card-meta [nzAvatar]="avatarTemplate3" [nzTitle]="data.bjtj.allalert-data.bjtj.ckalert" nzDescription="未审核">
      </nz-card-meta>
    </nz-card>
    <ng-template #avatarTemplate3>
      <!-- <i nz-icon nzType="file-search" nzTheme="outline"></i> -->
      <nz-avatar nzIcon="file-search" [nzShape]="'square'" style="background: #ef4d4c;" class="kkbj-titleinfo">
      </nz-avatar>
    </ng-template>
  </div>
</div>
<!-- 主页面 -->
<div nz-row style="background-color:white;padding: 20px;">
  <div nz-col nzSpan="24">
    <form nz-form [formGroup]="validateForm">
      <div nz-row>
        <div nz-col [nzSpan]="24" class="kkbj-form-flex">
          <nz-form-item nzFlex class="kkbj-form-item">
            <nz-form-label>部门</nz-form-label>
            <nz-form-control>
              <!-- <input [formControlName]="data.ctrlNames.bm" nz-input placeholder="请选择" /> -->
              <nz-tree-select [formControlName]="data.ctrlNames.bm" style="width: 150px" [nzNodes]="data.nodes"
                nzShowSearch (nzTreeClick)="nzTreeClick($event)" nzPlaceHolder="请选择" nzDropdownMatchSelectWidth=false
                [nzDropdownStyle]="{height:'500px'}">
              </nz-tree-select>
            </nz-form-control>
          </nz-form-item>
          <nz-form-item nzFlex class="kkbj-form-item">
            <nz-form-label>任务负责人</nz-form-label>
            <nz-form-control>
              <input [formControlName]="data.ctrlNames.fzr" nz-input placeholder="" />
            </nz-form-control>
          </nz-form-item>
          <nz-form-item nzFlex class="kkbj-form-item">
            <nz-form-label>下道时间起</nz-form-label>
            <nz-form-control>
              <nz-date-picker [formControlName]="data.ctrlNames.sjStart"></nz-date-picker>
            </nz-form-control>
          </nz-form-item>
          <nz-form-item nzFlex class="kkbj-form-item">
            <nz-form-label>下道时间止</nz-form-label>
            <nz-form-control>
              <nz-date-picker [formControlName]="data.ctrlNames.sjEnd"></nz-date-picker>
            </nz-form-control>
          </nz-form-item>
        </div>
      </div>

      <div nz-row>
        <div nz-col [nzSpan]="24" style="text-align: right;">
          <button nz-button [nzType]="'primary'" (click)="query(true)">查询</button>
          <button nz-button (click)="shenHe_all()">审核</button>
        </div>
      </div>
    </form>
  </div>
</div>
<div nz-row style="background-color:white;padding: 20px;">
  <div nz-col nzSpan="24">
    <nz-table #basicTable [nzScroll]="lockHeadScroll" [nzData]="data.tableData" [nzFrontPagination]="false"
      [nzTotal]="data.tableTotal" [(nzPageSize)]="data.tablePagination.rows" nzShowSizeChanger [nzShowPagination]="true"
      [(nzPageIndex)]="data.tablePagination.page" (nzPageIndexChange)="nzPageIndexChange()"
      (nzPageSizeChange)="setPageSize()" nzSize="small" nzBordered [nzShowTotal]="totalTemplate">
      <ng-template #totalTemplate let-total> 总共 {{ data.tableTotal }} 条数据 </ng-template>
      <thead>
        <tr>
          <th nzAlign="center" nzWidth="50px">审核</th>
          <th nzAlign="center" nzWidth="10%">任务名称</th>
          <th nzAlign="center" nzWidth="10%">车间</th>
          <th nzAlign="center" nzWidth="10%">工区</th>
          <th nzAlign="center" nzWidth="10%">遗失清单</th>
          <th nzAlign="center" nzWidth="10%">工具检查负责人</th>
          <th nzAlign="center" nzWidth="10%">工具下道时间</th>
          <th nzAlign="center" nzWidth="10%">工具上道时间</th>
          <th nzAlign="center">备注</th>
        </tr>
      </thead>
      <tbody>
        <tr *ngFor="let data of basicTable.data;let i = index">
          <ng-container *ngIf="data.isreview == '1'; else elseTemplate">
            <td>已审核</td>
          </ng-container>
          <ng-template #elseTemplate>
            <td nzShowCheckbox [(nzChecked)]="checkStatus[i]"></td>
          </ng-template>
          <td nzAlign="center">{{ data.TaskName }}</td>
          <td>{{ data.ShopName }}</td>
          <td nzAlign="center">{{ data.AreaName }}</td>
          <td>{{ data.ToolsAmountWrongReason }}</td>
          <td nzAlign="center">{{ data.Name }}</td>
          <td nzAlign="center">{{ data.AfterWorkScanDateTime |date:dateFormat}}</td>
          <td nzAlign="center">{{ data.BeforeWorkScanDateTime |date:dateFormat}}</td>
          <td>{{ data.Remark }}</td>
        </tr>
      </tbody>
    </nz-table>
  </div>
</div>